package example.strategy.irreversible;

import com.scop.desensitize.encry.irreversible.AbstractIRreversibleEncry;
import com.scop.desensitize.exception.factory.FactoryException;
import com.scop.desensitize.exception.strategy.EncodeException;
import com.scop.desensitize.factory.encry.EStrategy;
import com.scop.desensitize.factory.encry.irreversible.IrreverSibleFactory;

public class Md5sDemo {
    public static void main(String[] args) throws FactoryException, EncodeException {
        AbstractIRreversibleEncry encry = IrreverSibleFactory.create(EStrategy.MD5);
        //加密
        String encryption =(String) encry.encode("hello world");
        System.out.println("加密后："+encryption);
    }
}
